home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-1.iso / Files / Bus / S / S7P 3.6 Manual.sit / S7P 3.6 Manual.rsrc / TEXT_142.txt < prev    next >
Encoding:
Text File  |  1993-11-14  |  2.5 KB  |  17 lines

  1. Using the Low-Level Interface
  2.  
  3. System 7 Pack‚Äôs low-level interface gives you total control for sending and receiving more complex AppleEvents. These commands are very similar to the functions documented in the AppleEvent Manager chapter of Inside Macintosh Volume 6 or New Inside Macintosh: Interapplication Communication.
  4.  
  5. Sending an AppleEvent using the low-level interface involves creating the event, adding parameters to it, sending it, and finally disposing of the event and the reply.
  6.  
  7. To create an AppleEvent, call CreateAEVT specifying the target address, a 4-character event class, and a 4-character event ID. To add parameters to the AppleEvent, call PutShortParam, PutLongParam, PutTextParam, PutAliasParam, PutObject, PutPicParam,  or PutList, depending on the data type to be used.
  8.  
  9. The PutObject command can be used to include an object specifier in your AppleEvent, which allows you to tell the receiving application to act on one specific piece of data such as a particular window, a word or paragraph in a particular document, or an object in a drawing. Object specifiers may be nested to represented objects contained in another object (called a container). For example, an object specifier might be something like ‚Äòthe first character of the second word of the fifth paragraph in the document named ‚Äúgone with the wind‚Äù‚Äô.
  10.  
  11. Objects are always identified by a 4-letter class ID and either a numeric value or a name and an optional container, which will be 0 (null) for the top-level object. For example, a paragraph may be contained in a document or window, but a window or document has no container other than the application itself, so their container would be 0. An object also has certain properties, also identified by 4-letter words. Typical properties would be the font, font size, style, and color. See Appendix D for a list of common object classes and property IDs.
  12.  
  13. Receiving an AppleEvent using the low-level commands is much easier, since most of the work is already done for you by the AppleEvent manager. When an AppleEvent is received, the procedure that was installed with HandleAEVT will be called. It can use a combination of low-level and high-level functions to obtain data from the AppleEvent.
  14.  
  15. When receiving anything more complex than a single text or numeric direct object, you should use the commands GetShortParam, GetLongParam, GetTextParam, GetAliasParam, GetPicParam, or GetList to extract data from the event. Note that there is no way to receive an object specifier, since 4D¬Æ doesn‚Äôt provide a way to resolve them into references to actual data.
  16.  
  17.